isEmpty( MYLIB_ROOT ) { MYLIB_ROOT = "D:\\mylib" }

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++11

## ############ for debug ############
CONFIG(debug, debug|release) {
    LIB_D = d
} else {
    LIB_D =
}


## #############################################################
XLSLIB_ROOT        = $${MYLIB_ROOT}/xlslib/xlslib-2.5.0/xlslib
INCLUDEPATH     += $${XLSLIB_ROOT}/src \
                    $${XLSLIB_ROOT}/src/common \
                    $${XLSLIB_ROOT}/src/oledoc \
                    $${XLSLIB_ROOT}/src/xlslib \
                    $${XLSLIB_ROOT}/build/msvc2017

contains(QT_ARCH, i386){
    TARGET_ARCH = Win32
} else {
    TARGET_ARCH = x64
}

CONFIG(debug, debug|release) {
    XLSLIB_DIR = $${TARGET_ARCH}_MSVC2017.Debug
} else {
    XLSLIB_DIR = $${TARGET_ARCH}_MSVC2017.Release
}

LIBS            += -L$${XLSLIB_ROOT}/build/msvc2017/bin/$${XLSLIB_DIR} -lxlslib_lib
## #############################################################


## #############################################################
contains(QT_ARCH, i386){
    XNDT_ROOT = $${MYLIB_ROOT}/XNDT-SDK/VS2017-X86
} else {
    XNDT_ROOT = $${MYLIB_ROOT}/XNDT-SDK/VS2017-X64
}

INCLUDEPATH +=  $${XNDT_ROOT}/xexcel
LIBS        +=  -L$${XNDT_ROOT}/xexcel -lxexcel$${LIB_D}
## #############################################################


# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    main.cpp \
    mainwindow.cpp

HEADERS += \
    mainwindow.h

FORMS += \
    mainwindow.ui

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
